<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title> typeof的返回值 </title>
</head>
<body>
<script>
//    typeof: 判断变量的数据类型
//返回值：六种， 相比较数据类型而言，少了数组和null, 多了个function
// 数组的返回值是object
    var arr = [1, 2, 3,4]
    var abc
    var cd = null
    var obj = {name:'yanhan'}
    console.log( typeof  arr)  // object
    console.log( typeof  function(){} )  // function
    console.log( typeof  abc)  // undefined,
    console.log( typeof cd)  //  object
    console.log( typeof obj)  // object
    console.log( typeof 1234)  // number
    console.log( typeof '1234' )  // string
    console.log( typeof true)  // boolean
</script>
</body>
</html>